package com.eshore.textanalyzer.elk.service;

import com.eshore.textanalyzer.elk.common.ResponseMessage;
import com.eshore.textanalyzer.elk.pojo.TagEsState;
import com.eshore.textanalyzer.elk.pojo.ToEsData;
import com.eshore.textanalyzer.elk.pojo.Paper;

import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * @author xyd
 * @date 2021/5/17
 * 定义 ELK 操作接口
 */
public interface ElkService {
    // 查询 es 数据
    Paper<Map<String,String>> getEsDataList(int page, int size, String texts) throws IOException;
    ResponseMessage getEsDataListHp(int page, int size, String texts) throws IOException;
    // 根据 _id 查询es数据
    List<Map<String, Object>> getSearchEsById(String id) throws IOException;
    // 批量从mysql中加载数据到es
    ResponseMessage writeMysqlDataToEs(ToEsData jdbcs,TagEsState tagEsState) throws SQLException;
    // 清空指定索引下的数据
    ResponseMessage clearEsIndexData(String indexName, String business_type, TagEsState tagEsState);
    // 获取指定月份的热词分析数据
    ResponseMessage getHotWordsByMonth(String time_month);
}
